#include "Time.h"
#include <boost/date_time.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp>

CORE_BEGIN

boost::uint64_t getCurrentTime()
{
    boost::posix_time::ptime now =
        boost::posix_time::microsec_clock::local_time();

    boost::posix_time::ptime epoch(
        boost::gregorian::date(1970, 1, 1),
        boost::posix_time::seconds(0));

    return (now - epoch).total_microseconds();
}

CORE_END